package com.wgq.TestGame;

import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.net.URL;

//工具类
public class TestUTilGame {
    public  static Image getImage(String path){
        BufferedImage image= null;
        URL u=  TestUTilGame.class.getClassLoader().getResource(path);
        try {
            image = ImageIO.read(u);
        } catch (IOException e) {
            e.printStackTrace();
        }
        return image;
    }
}
